import request from '@/utils/request'

const api_name = '/admin/hosp/hospitalSet'

export default {
    //医院设置条件查询分页
    getPageList(current,limit,searchObj) {
        return request({
            //接口路径
            url: `${api_name}/hospSetPageQuery/${current}/${limit}`,
            //提交方式
            method: 'post',
            //接口传递参数
            //普通参数写法：     params:参数名称
            //requestbody写法： data:参数名称 ，使用json结构传输数据
            data:searchObj
        })
    },
    //医院设置删除
    removeById(id) {
        return request({
            url: `${api_name}/remove/${id}`,
            method: 'delete'
        })
    },
    //添加医院设置
    save(hospset) {
        return request({
            url: `${api_name}/saveHospSet`,
            method: 'post',
            data:hospset
        })
    },
    //id查询
    getHospset(id) {
        return request({
            url: `${api_name}/getHospSet/${id}`,
            method: 'get'
        })
    },
    //修改
    update(hospset) {
        return request({
            url: `${api_name}/updateHospSet`,
            method: 'post',
            data:hospset
        })
    },
    //批量删除
    removeBatch(idList) {
        return request({
            url: `${api_name}/deleteBatch`,
            method: 'delete',
            data:idList
        })
    },
    //医院设置锁定
    lockHospSet(id,status) {
        return request({
            url: `${api_name}/lockHospSet/${id}/${status}`,
            method: 'put'
        })
    },
}